Skip to content

fix(ai-accounts): neutralise the quota bar fill, not just its text - #937

Merged
kittors merged 1 commit into
devfrom
fix/quota-bar-neutral-fill
Aug 21, 2026
Merged

fix(ai-accounts): neutralise the quota bar fill, not just its text#937
kittors merged 1 commit into
devfrom
fix/quota-bar-neutral-fill

Conversation

@kittors

@kittors kittors commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Follow-up to #936. Panel-only.

What #936 missed

#936 neutralised percentClass, chipClass and chipLabelClass. Verified on production after deploy, the card still rendered as a green band:

pctCls  = "… tabular-nums text-slate-700 dark:text-white/80"   ← #936 landed
fillCls = "absolute inset-y-0 left-0 opacity-20 … bg-emerald-500"  ← the actual green

The card view renders quota through renderQuotaBarNode, not QuotaMetricChips β€” there is no auth-file-quota-metric node on the page at all. It consumes exactly one field from the tone, fillClass, and paints it as the row's own background rather than a slim track underneath. At 100% that fill covers the entire line, so the row was still fully green no matter what colour the label and percent were.

The change

fillClass moves to neutral slate for the β‰₯60% branch. fillHex keeps its emerald β€” that one drives the 14px progress ring in QuotaMetricChips, where the colour occupies a ring instead of a whole row.

Amber (20–60%) and rose (<20%) fills are untouched, so a bar that changes colour now means something actually changed.

Verified

Patched the class live on production and re-screenshotted: the three quota rows drop to neutral, and the card reads as a normal card. What #936 already fixed and this PR does not touch: subscription badge (剩余 6 倩) and success rate (99.7%) both render neutral on production now.

Gates: design:check βœ… Β· size:check βœ… Β· surface:check βœ… Β· lint 0 errors βœ… Β· 243 tests / 21 files βœ…

πŸ€– Generated with Claude Code

#936 neutralised percentClass, chipClass and chipLabelClass, but the card
view renders quota through renderQuotaBarNode, which uses none of them
except the percent: it consumes fillClass and paints it as the row's own
background rather than a slim track underneath. At 100% that fill covers
the entire line, so every healthy window still rendered as a green band
and the card read exactly as before.

Move fillClass to neutral slate for the >= 60% branch. fillHex keeps its
emerald: it drives the 14px progress ring in QuotaMetricChips, where the
colour occupies a ring instead of a row. Amber and rose fills are left
alone, so a bar that changes colour now means something changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kittors
kittors merged commit ffc9932 into dev Aug 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant